<p>role detail </p>
<p class="tip" style="display:none;"></p>


<form id="editRole" method="post">
    <input name="_id" readonly type="hidden" value="<%- item.role._id%>" ><br/>
    <input class="switchEditable" name="name" placeHolder="name" value="<%- item.role.name%>"><br>
    <input class="switchEditable" name="description" required placeHolder="description" value="<%- item.role.description%>"><br>


        <% _.each(item.permissions,function(permission){ %>
            <label>
                <input 
                class="switchEditable"
                type="checkbox" 
                name="permissions" 
                value="<%- permission.code %>"
                <% if(permission.have){ %>
                    checked
                <%  } %>
                />
                <%- permission.name %>
            </label>
        <%  }); %>
    <br/>
    <button id='enableEditRole'>edit</button>
    <button id='commitEditRole' class="switchEditable" >commit</button>
</form>